0be43802f233be1d4879dd881fdb77eefa4d35c9,src/org/exist/xquery/LocationStep.java,LocationStep,getChildren,#XQueryContext#NodeSet#,343

Before Change


			if (currentSet == null || currentDocs == null || !(docs == currentDocs || docs.equals(currentDocs))) {
                currentDocs = docs;
                currentSet =
                    (NodeSet) context.getBroker().getElementIndex().findElementsByTagName(
                        ElementValue.ELEMENT, currentDocs, test.getName(), null);
                registerUpdateListener();
            }
            return currentSet.selectParentChild(contextSet, NodeSet.DESCENDANT, inPredicate);

After Change


			DocumentSet docs = getDocumentSet(contextSet);
			//TODO : understand why this one is different from the other ones
			if (currentSet == null || currentDocs == null || !(docs == currentDocs || docs.equals(currentDocs))) {
                ElementIndex index = context.getBroker().getElementIndex();                
                currentSet = index.findElementsByTagName(ElementValue.ELEMENT, docs, test.getName(), null);
                currentDocs = docs;
                registerUpdateListener();
            }